<script>
    jQuery(document).ready(function () {
        // binds form submission and fields to the validation engine
        jQuery("#formID").validationEngine({promptPosition:"topLeft", scroll:false});
        jQuery('.region-content .content .node-project').removeClass('clearfix');
        var title = jQuery('.region-content .content h2 a').text();
        if(title == 'Pricing'){
            jQuery('.region-content .content h2 a').remove();
        }
        jQuery('.meta.submitted').append('<img src="images/spacer.png" class="picture" />');
		
		jQuery('#edit-name').attr('placeholder','Your name');
		jQuery('#edit-mail').attr('placeholder','Your email');
		jQuery('#edit-subject').attr('placeholder','Subject');
		jQuery('#edit-message').attr('placeholder','Your message');
        jQuery('.region-row-two-one .content .views-row .views-field-view-node .field-content a').attr('href','#');
        jQuery('#node-6').remove();
        jQuery("#price-thanh").append(jQuery(".content .blogleft div.sell-price").html());
        jQuery(".content .blogleft div.sell-price").remove();
        jQuery("#add-cart-thanh").append(jQuery(".content .blogleft div.add-to-cart").html());
        jQuery(".content .blogleft div.add-to-cart").remove();
    });

    function checkHELLO(field, rules, i, options) {
        if (field.val() != "HELLO") {
            // this allows to use i18 for the error msgs
            return options.allrules.validate2fields.alertText;
        }
    }
</script>
<?php $og_title = array(
    '#tag' => 'meta',
    '#attributes' => array(
        'name' => 'viewport',
        'content' => "width=device-width, initial-scale=1, maximum-scale=1",
    )
);
drupal_add_html_head($og_title, 'zujava_og_title');
?>
<!-- TOP -->
<div id="fixtop" class="default whiteunderline">
    <div class="topwhite">
        <div class="topwhite left"></div>
        <div class="topwhite middle">
            <div class="logowhite left">
                <div class="slogan">
                    <?php print render($page['header-left']); ?>
                </div>
                <?php if ($logo): ?>
                <a href="<?php print $front_page; ?>" class="logodark" title="<?php print t('Home'); ?>" rel="home"
                   id="logo">
                    <img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>"/>
                </a>
                <?php endif; ?>
            </div>

            <nav>
                <?php if ($main_menu): ?>
                <div id="menuWhite">
                    <?php
                    // id, direction, depth should have the values you want them to have.
                    $menu = theme('nice_menus', array('id' => 0, 'direction' => 'down', 'depth' => 2, 'menu_name' => 'main-menu', 'menu' => NULL));
                    print $menu['content'];
                    ?>
                </div>
                <?php endif; ?>
            </nav>
            <!-- END OF MENU -->

            <div class="socialicons">
                <?php print render($page['header-right']); ?>
            </div>
            <div class="socialtext">Follow us on:</div>

            <div class="searchbox">
                <div id="bar">
                    <div id="containerr">
                        <!-- Login Starts Here -->
                        <div id="loginContainer">
                            <a href="#" id="loginButtonWhite" class="smallchange"><span></span><em></em></a>

                            <div class="clearfix"></div>
                            <div id="loginBox">
                                <form id="loginForm">
                                    <a href="#" id="loginButton2"><span></span></a>
                                    <input id="suggestBox2" class="search" type="text" value="Search" name="search"
                                           onblur="if (this.value == '') {this.value = 'Search';}"
                                           onfocus="if (this.value == 'Search') {this.value = '';}">
                                </form>
                            </div>
                        </div>
                        <!-- Login Ends Here -->
                    </div>
                </div>
            </div>
        </div>
    </div>
</div><!-- End of TOP -->

<?php if ($page['theme-title']) { ?>
<div class="themetitle2">
    <div class="themetitlewrapper">
        <?php print render($page['theme-title']); ?>
    </div>
</div>
<?php } ?>

<!--front page-->
<?php if ($page['main-slider']) { ?>
<div class="box1">
    <div class="fullwidthbanner-container">
        <div class="fullwidthbanner">
            <?php print render($page['main-slider']); ?>
        </div>
    </div>
</div>
<?php } ?>

<?php if ($page['contact-map']) { ?>
<section class="google-map-container">
    <?php print render($page['contact-map']); ?>
</section>
<?php } ?>

<?php if ($page['contact-row-one'] || $page['contact-form']) { ?>
<div class="page">
    <div class="box3">
        <?php print render($page['contact-row-one']); ?>
    </div>
    <div class="line3"></div>
    <div class="box3">
		<span id="feelfree" class="title2">Feel free to contact us</span>
        <?php print render($page['contact-form']); ?>
    </div>
</div>
<?php } ?>

<?php if ($page['row-one']) { ?>
<div class="box4">
    <div class="shadow4"></div>
    <div class="box4container">
        <?php print render($page['row-one']); ?>
    </div>
</div>
<?php } ?>

<?php if ($page['row-two-one'] && $page['row-two-two'] && $page['row-two-three'] && $page['row-two-four']) { ?>
<div class="box5">
    <div class="shadow2"></div>
    <div class="box5container">
        <div class="onefourth lmc">
            <?php print render($page['row-two-one']); ?>
        </div>
        <div class="onefourth lmc">
            <?php print render($page['row-two-two']); ?>
        </div>
        <div class="onefourth lmc">
            <?php print render($page['row-two-three']); ?>
        </div>
        <div class="onefourthlast lmc">
            <?php print render($page['row-two-four']); ?>
        </div>
        <div class="clearfix"></div>
    </div>
</div>
<?php }?>

<!--blog page-->

<?php
if (!$is_front) {
    if(isset($node->type) && ($node->type == 'blog')){ ?>
        <div class="themetitle2">
            <div class="themetitlewrapper">
                <?php print render($page['blog-title']); ?>
            </div>
        </div>
        <div class="pageblog">
		<!--left blog content-->
        <div class="blogleft">
            <?php print render($page['content']); ?>
        </div>
        <!--right blog content-->
        <div class="blogright">
            <script type="text/javascript">
                jQuery(document).ready(function (){
                    jQuery('.region-right-bar-one .content .item-list ul li div.views-field-name').contents().unwrap();
                    jQuery('.region-right-bar-two #block-quicktabs-tab > .content #quicktabs-tab > .item-list ul').append('<div style="clear:both">');
                    jQuery('.region-right-bar-one-blog .content .item-list ul li div.views-field-name').contents().unwrap();
                    jQuery('.region-right-bar-two-blog #block-quicktabs-tab > .content #quicktabs-tab > .item-list ul').append('<div style="clear:both">');
                    jQuery('.region-content .content .comment_count').prepend('<div>');
                });
            </script>
            <div class="blogsearch">
                <?php print $search_box; ?>
            </div>

            <?php print render($page['right-bar-one-blog']); ?>
            <?php print render($page['right-bar-two-blog']); ?>
            <?php print render($page['right-bar-three-blog']); ?>
        </div>
        </div>
    <?php }else{
        if(isset($node) && ($node->type == 'project' || $node->type == 'product')){ ?>
            <div class="themetitle2">
                <div class="themetitlewrapper">
                    <?php print render($page['project-title']); ?>
                </div>
            </div>
        <?php
        }
        if( $page['right-bar-one']){ ?>
            <div class="pageblog">
            <div class="blogright">
               <?php
                    print render($page['right-bar-one']);
                    print render($page['right-bar-two']);
                    print render($page['right-bar-three']);
                ?>
            </div>
            <div class="blogleft">
                <?php print render($page['content']); ?>
            </div>
            </div>
        <?php
        }elseif( $page['right-bar-four']){ ?>
            <div class="pageblog">
                <div class="blogright">
                    <?php
                    print render($page['right-bar-four']);
                    ?>
                </div>
                <div class="blogleft">
                    <?php print render($page['content']); ?>
                </div>
            </div>
        <?php
        }else{ ?>
            <div class="page">
                <?php print render($page['content']); ?>
            </div>
        <?php
        }
        ?>
<div class="clearfix"></div>

<!-- END OF PAGE Class-->
</div>

<?php
    }
}
?>
<!--end blog page-->

<!-- FOOTER LOGOS-->

<?php if ($page['row-two-one']) { ?>
<div class="footerlogos">
    <div class="footerlogostop page">
        <?php print render($page['row-three']); ?>
    </div>
</div>
<?php } ?>

<!-- END OF FOOTER LOGOS-->

<!-- FOOTER -->
<footer>
    <div class="footerwrapper">
        <div class="fcol1">
            <?php print render($page['footer-one']); ?>
        </div>
        <div class="footerbrake2"></div>
        <div class="fcol2">
            <?php print render($page['footer-two']); ?>
        </div>
        <div class="footerbrake"></div>
        <div class="fcol3">
            <?php print render($page['footer-three']); ?>
        </div>
        <div class="footerbrake2"></div>
        <div class="fcol4">
            <?php print render($page['footer-four']); ?>
        </div>
        <div class="footerbrake"></div>
        <div class="fcol5">
            <?php print render($page['footer-five']); ?>
        </div>
    </div>

    <div class="clearfix"></div>

    <div class="line6"></div>

    <div class="copyright">
        <div class="footerlogowrapper">
            <div class="footerlogo">
                <a href="<?php print $front_page; ?>"><img src="<?php print $logo; ?>" width="146px"></a>
            </div>
        </div>
        <div class="fright">Copyright © 2013 <a href="#" class="flink2">TitanicThemes</a>. All rights reserved.</div>
        <div class="fleft">@ Creative Designs Studios™</div>
        <div class="clearfix"></div>
        <p id="back-top"><a href="#top"><span></span>Top</a></p>
    </div>

</footer>
<!-- END OF FOOTER -->
